﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BeerManagementSystem
{
    /// <summary>
    /// Interaktionslogik für EmulatedCardReaderInput.xaml
    /// </summary>
    /// 
   

    public partial class EmulatedCardReaderInput : Window
    {
        public int EmulatedIdentity = -1;
        private EmulatedCardReader _parent;
        private LogWriter log;

        public EmulatedCardReaderInput(EmulatedCardReader parent)
        {
            InitializeComponent();
            _parent = parent;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            EmulatedIdentity = (int)slider1.Value;
            _parent.Read(EmulatedIdentity);
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            _parent.Invalid();
        }
        public void close() { this.close(); }

        private void Window_Initialized(object sender, EventArgs e)
        {
            ////log.WriteMessage("EmulatedCardReader: open");
        }

        private void Window_Closed(object sender, EventArgs e)
        {
            ////log.WriteMessage("EmulatedCardReader: shutdown");
        }
    }
}
